//
//  ManagementStudentCell.m
//  CoachsBook
//
//  Created by MaBookPro on 2022/8/20.
//

#import "ManagementStudentCell.h"

@implementation ManagementStudentCell


-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        
        [self creatcelllist];
    }
    return self;
}

-(void)creatcelllist{
    

    UIView *backView = [[UIView alloc]initWithFrame:CGRectMake(15, 15, APPwidth, 130)];
    backView.backgroundColor = rgba(245, 245, 250, 1);
    [self addSubview:backView];
    
    UILabel *nameLab = [[UILabel alloc]initWithFrame:CGRectMake(15,  15, APPwidth/2-40, 20)];
    nameLab.text = @"学员：阿牛";
    nameLab.textColor = rgba(51, 51, 51, 1);
    nameLab.textAlignment = 0;
    nameLab.font = [UIFont systemFontOfSize:16 weight:bold];
    [backView addSubview:nameLab];
    
    
    UIButton *_phoneBtn = [[UIButton alloc]initWithFrame:CGRectMake(nameLab.frame.size.width+nameLab.frame.origin.x+5,  15, backView.width/2-40, 20)];
    [_phoneBtn setTitle:@"13117411248" forState:0] ;
    [_phoneBtn setTitleColor: rgba(22, 120, 255, 1) forState:0] ;
    _phoneBtn.titleLabel.textAlignment = 0;
    _phoneBtn.titleLabel.font = [UIFont systemFontOfSize:16];
    [backView addSubview:_phoneBtn];
    [_phoneBtn setImage:[UIImage imageNamed:@"phoneicon"] forState:0];
    _phoneBtn.imageEdgeInsets = UIEdgeInsetsMake(0, 130, 0, 0);
    _phoneBtn.titleEdgeInsets = UIEdgeInsetsMake(0, 0, 0, 40);
    [_phoneBtn.imageView setContentMode:UIViewContentModeScaleAspectFit];
    
    UILabel *typeLab = [[UILabel alloc]initWithFrame:CGRectMake(15,nameLab.frame.size.height+nameLab.frame.origin.y+10, 60, 20)];
    typeLab.text = @"选择科目:";
    typeLab.textColor = rgba(138, 138, 138, 1);
    typeLab.layer.backgroundColor = rgba(245, 245, 250, 1).CGColor;
    typeLab.textAlignment = 0;
    typeLab.layer.cornerRadius = 10;
    typeLab.font = [UIFont systemFontOfSize:12];
    [backView addSubview:typeLab];
    
    
    UIButton *PleastComfortbtn = [[UIButton alloc]initWithFrame:CGRectMake(typeLab.frame.size.width+typeLab.x+5, nameLab.frame.size.height+nameLab.frame.origin.y+10, 60, 20)];
    [PleastComfortbtn setTitle:@"科二" forState:0];
    PleastComfortbtn.titleLabel.textAlignment = 1;
    PleastComfortbtn.titleLabel.font = [UIFont systemFontOfSize:14];
    [PleastComfortbtn setTitleColor:rgba(22, 120, 255, 1) forState:0];
    //    rightButton.imageEdgeInsets = UIEdgeInsetsMake(10, 13, 7, 62);
    //    [rightButton.imageView setContentMode:UIViewContentModeScaleAspectFit];
    //    rightButton.titleEdgeInsets = UIEdgeInsetsMake(0, 13, 0, 0);
    [backView addSubview:PleastComfortbtn];


    UILabel  *_disLab = [[UILabel alloc]initWithFrame:CGRectMake(15, typeLab.frame.size.height + typeLab.frame.origin.y+10, backView.frame.size.width-30, 15)];
    _disLab.text = @"绑定时间:2022/07/25  09:23";
    _disLab.textColor = rgba(153, 153, 153, 1);
    _disLab.textAlignment = 0;
    _disLab.font = [UIFont systemFontOfSize:12];
    [backView addSubview:_disLab];
    
    UILabel  *chengjiLab = [[UILabel alloc]initWithFrame:CGRectMake(15, _disLab.frame.size.height + _disLab.frame.origin.y+10, backView.frame.size.width-30, 15)];
    chengjiLab.text = @"考试成绩:96分";
    chengjiLab.textColor = rgba(153, 153, 153, 1);
    chengjiLab.textAlignment = 0;
    chengjiLab.font = [UIFont systemFontOfSize:12];
    [backView addSubview:chengjiLab];
    
    
    
    
    
    
    
    
    
    

}
- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
